module.exports = {
	/**
	 * 本页面功能已作废，仅为兼容老版本保留此文件
	 */
	main: async (event) => {
		let {
			data = {}, userInfo, util, filterResponse, originalParam
		} = event;
		let {
			customUtil,
			uniID,
			config,
			pubFun,
			vk,
			db,
			_
		} = util;
		let {
			uid
		} = data;
		let res = {
			code: 0,
			msg: 'ok'
		};
		// 业务逻辑开始-----------------------------------------------------------
		// 获取前端传过来的参数
		let {
			ad_id,
			desc,
			tfurl,
			agentId,
			middleman_id,
			appid,
			tv_id,
			tv_name,
			series,
			follow,
			gzhId,
			path,
			platform
		} = data;
		// 参数验证开始
		
		tfurl = "";
		path = "player";
		platform = "douyin";
		agentId = userInfo._id;
		agent_username = userInfo.username;
		middleman_id = userInfo.middleman_id;
		middleman_username = userInfo.middleman_username;
		// 参数验证结束
		let dbName = "a_dy_tfurl"; // 表名
		// 执行 数据库add 命令
		res.id = await vk.baseDao.add({
			dbName,
			dataJson: {
				ad_id,
				desc,
				tfurl,
				agentId,
				agent_username,
				middleman_id,
				middleman_username,
				appid,
				tv_id,
				tv_name,
				series,
				follow,
				gzhId,
				path,
				platform
			}
		});
		// 业务逻辑结束-----------------------------------------------------------
		return res;
	}
}
